package com.huahua.api.entity.base;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.relational.core.mapping.Column;

import java.time.LocalDateTime;

@Data
public abstract class BaseEntity {

    @Id
    private Long id;

    @Column("create_time")
    @CreatedDate
    private LocalDateTime createTime;

    @Column("update_time")
    @LastModifiedDate
    private LocalDateTime updateTime;

    @Column("remove_flag")
    private Integer removeFlag = 0;
}
